<!-- 机关单位管理 -->
<template>
    <a-row justify="space-between" style="padding-bottom:10px;align-items: center;">
       <slot name="addBtn"></slot>
    <a-col >
    <a-form
        layout="inline"
        ref="formRef"
    >
      <template v-for="item in props.filedMap" :key="item.name" >
        <a-form-item :name="item.name" :label="item.label" >
           <template v-if="item.type=='text'" >      
            <a-input   v-model:value="formData[item.name]" placeholder="请输入"/>    
            </template>
              <template v-else-if="item.type=='select'"  >
               <v-select-dict-item style="width:200px" :code="item.code" v-model:value="formData[item.name]"/>
              </template>
        </a-form-item>
      </template>
    <a-form-item>
       <slot name="searchBtn" ></slot>     
    </a-form-item>
    </a-form>
    </a-col>
  </a-row>
</template>
<script lang="ts" setup>
import { reactive, ref,Ref} from 'vue'
import { SearchOutlined,PlusOutlined } from '@ant-design/icons-vue'
import { FormInstance} from 'ant-design-vue'
import { message ,Modal} from 'ant-design-vue'
const drawerRef = ref<FormInstance>() as Ref<FormInstance>
const props=defineProps({
    filedMap:<any>{},//需要生成的form表单的字段
    formData: <any>{},//表单数据
})
const formData=props.formData
const getformData=()=>{//获取修改后的form表单的数据
    return formData
}

defineExpose({ getformData})//暴露出获取表单数据的方法
</script>
